<?php
/**
 * Created by PhpStorm.
 * User: DELL
 * Date: 2017/2/11
 * Time: 10:09
 */
namespace common\models;

use Yii;
use yii\db\ActiveRecord;

class Onsales extends ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%onsales}}';
    }

    public static function goodsOnSale()
    {
        $arr_goods = self::find()->where(['status' => 1])->asArray()->all();
        return $arr_goods;
    }
}